package com.twu.bibilioteca;

import org.junit.Test;

import static junit.framework.Assert.assertEquals;

/**
 * Created by IntelliJ IDEA.
 * User: dixithk
 * Date: 6/19/14
 * Time: 5:40 PM
 * To change this template use File | Settings | File Templates.
 */
public class CheckOutBookTest {


    Library lib =new Library();
    
    @Test
    public void shouldCheckForValidCheckOut()
    {
        
        Result c= new CheckOutBook(new UserInterfaceTest("program in C") , lib).action();
        assertEquals(new Result("Thank you Enjoy the book " , true) , c) ;
    }

    @Test
    public void shouldCheckForInValidCheckOut()
    {

        Result c= new CheckOutBook(new UserInterfaceTest("program in C&ds") , lib).action();
        assertEquals(new Result("That book is not available." , false) , c) ;
    }

    @Test                            
    
    public void shouldCheckJobOfClass()
    {
          new CheckOutBook(new UserInterfaceApp(), lib).getName();
    }

}
